Allow passing 'null' to setLevel and setLabel, so 'null' and 'undefined'
behave the same way.
Fixes a regression introduced by
a42f7c23, which caused parts of old
notifications to persist into new notifications, or elements being
incorrectly made visible
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2917>
}
setLabel(label) {
- this._label.visible = label !== undefined;
- if (label)
+ this._label.visible = label != null;
+ if (this._label.visible)
this._label.text = label;
this._updateBoxVisibility();
}
setLevel(value) {
- this._level.visible = value !== undefined;
- if (value !== undefined) {
+ this._level.visible = value != null;
+ if (this._level.visible) {
if (this.visible) {
this._level.ease_property('value', value, {
mode: Clutter.AnimationMode.EASE_OUT_QUAD,